<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
<meta name="Generator" content="WUKONG 1.0" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="Keywords" content="<?php echo $this->_var['keywords']; ?>" />
	<meta name="Description" content="<?php echo $this->_var['description']; ?>" />

	<title><?php echo $this->_var['page_title']; ?></title>
    
    <link rel="shortcut icon" href="favicon.ico" />
    <link rel="icon" href="animated_favicon.gif" type="image/gif" />
    <link href="<?php echo $this->_var['ecs_css_path_hgs']; ?>" rel="stylesheet" type="text/css" />
    <link href="<?php echo $this->_var['ecs_css_path_users']; ?>" rel="stylesheet" type="text/css" />    
        
<?php echo $this->smarty_insert_scripts(array('files'=>'jquery-1.7.1.min.js,jquery.json.js,transport.js,hgsstyle.js,hgscommon.js,hgsgoods.js')); ?>
    </head>
    
    <body>
        <div class="main">
        
	<div class="dw_head"></div>
	<div class="dw_nav" name="dw_nav" id="dw_nav"></div>
    <div class="banner" id="banner">
    </div>    
	<div class="mainbg" name="MainName">
			<?php echo $this->fetch('library/page_header.lbi'); ?>     			
            
        <div class="product">
            <div class="users_url"><?php echo $this->fetch('library/ur_here.lbi'); ?></div> 
            
                    
<form action="javascript:addToCart(<?php echo $this->_var['goods']['goods_id']; ?>)" method="post" name="ECS_FORMBUY" id="ECS_FORMBUY" autocomplete="off">                
            <div class="product_buy">
                <div class="product_buy_img">
                    <img src="<?php echo $this->_var['goods']['goods_img']; ?>" alt="<?php echo htmlspecialchars($this->_var['goods']['goods_name']); ?>" />
                </div>
                <div class="product_buy_txt">
                    <div class="product_txt_title">
                        <?php echo $this->_var['goods']['goods_style_name']; ?>
                    </div>
                    	
                    <div class="product_txt_guige">
                    
                        <div class="product_txt_guige_name">
                            价格
                        </div>
                        
                        <div class="product_txt_guige_cont">
                            <div class="product_num">
                                <div class="product_radio_price" id=product_price>
                                <?php if ($this->_var['url_goods_attr_id'] > 0): ?>￥<?php echo $this->_var['url_goods_attr_total_price']; ?><?php else: ?><?php echo $this->_var['goods']['shop_price_formated']; ?><?php endif; ?>
                                </div>
                            </div>
                        </div>
                        <input type="hidden" id="goods_shop_price" value="<?php echo $this->_var['goods']['shop_price']; ?>" />
                    </div>
                    
                    
                    
               <div class="product_txt_guige">
                    <div class="product_guige_name">
                        <div class="product_txt_guige_name" style="text-align:left">
                            <?php echo $this->_var['lang']['specifications']; ?>
                        </div>            
                         <div class="product_guige_name_right">                           
                           
                        <?php $_from = $this->_var['specification']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('spec_key', 'spec');if (count($_from)):
    foreach ($_from AS $this->_var['spec_key'] => $this->_var['spec']):
?>
                        <?php $_from = $this->_var['spec']['values']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'value');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['value']):
?>
                        <div class="product_guige_1_s">                            
                            <div class="product_radio">
                                <?php if ($this->_var['value']['price'] == 0): ?>
                            <input type="radio"  name="spec_<?php echo $this->_var['spec_key']; ?>" value="<?php echo $this->_var['value']['id']; ?>" checked="checked"
                                            id="spec_value_<?php echo $this->_var['value']['id']; ?>" onclick="update_price_with_attr()" />  
                                <?php else: ?>
                            <input type="radio"  name="spec_<?php echo $this->_var['spec_key']; ?>" value="<?php echo $this->_var['value']['id']; ?>" <?php if ($this->_var['url_goods_attr_id'] == $this->_var['value']['id']): ?>checked="checked"<?php endif; ?>
                                            id="spec_value_<?php echo $this->_var['value']['id']; ?>" onclick="update_price_with_attr()"/>
                                <?php endif; ?>                                    
                            </div> 
                            <div class="product_txt_guige_name" style="width:60">
                                 <input type="hidden" id="txt_spec_value_<?php echo $this->_var['value']['id']; ?>" value="<?php echo $this->_var['value']['price']; ?>" /> <?php echo $this->_var['value']['label']; ?>
                            </div>
                        </div> 
                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>                     
                        </div> 
                      </div>    
                                      
                            <div class="product_guige_2">
                                <div class="product_txt_img">
                                </div>
                                <span style="color:#4b9411; padding:0px 5px;">
                                    
                                    <?php echo $this->_var['lang']['goods_cumulated_points_member']; ?>  
                                   
                                </span>
                                    <?php echo $this->_var['lang']['goods_cumulated_points_canGet']; ?> 
                                <span style="color:#4b9411; padding:0px 2px;" id="goods_integral_points">
                                    <?php echo $this->_var['goods']['give_integral']; ?>
                                </span>
                                <?php echo $this->_var['lang']['goods_cumulated_points']; ?>
                            </div>

							<?php $this->assign('showdiv','none'); ?>
                            <?php $_from = $this->_var['properties']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'property_group');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['property_group']):
?>
                            <?php $_from = $this->_var['property_group']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'property');if (count($_from)):
    foreach ($_from AS $this->_var['property']):
?>
                            <?php if ($this->_var['property']['name'] == '赠品文字'): ?>
									<?php $this->assign('showdiv','inline'); ?>
                            <?php endif; ?>
                            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>                            
    
                            <div class="product_txt_guige_name" style="display:<?php echo $this->_var['showdiv']; ?>;width:auto" >
                                赠品
                            </div>                                                         
                            <div class="product_guige_3" style="display:<?php echo $this->_var['showdiv']; ?>;width:auto;padding-left:12px">
                               <blockquote style="width:auto">                             
                                        <?php $_from = $this->_var['properties']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'property_group');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['property_group']):
?>
                                        <?php $_from = $this->_var['property_group']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'property');if (count($_from)):
    foreach ($_from AS $this->_var['property']):
?>
                                        <?php if ($this->_var['property']['name'] == '赠品图片'): ?>
                                        <div class="zengpin_img">
                                            <?php echo $this->_var['property']['value']; ?>
                                        </div>
                                        <?php endif; ?>
                                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                                        <?php $_from = $this->_var['properties']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'property_group');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['property_group']):
?>
                                        <?php $_from = $this->_var['property_group']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'property');if (count($_from)):
    foreach ($_from AS $this->_var['property']):
?>
                                        <?php if ($this->_var['property']['name'] == '赠品文字'): ?>
                                        <div class="zengpin_wenzi">
                                            <?php echo $this->_var['property']['value']; ?>
                                        </div>
                                        <?php endif; ?>
                                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>  
                                                                            
                                </blockquote>
                            </div>
                            
                        </div><div class="product_txt_guige">
                        <div class="product_txt_guige_name">
                            <?php echo $this->_var['lang']['goods_item_count']; ?>
                        </div>
                        <div class="product_txt_guige_cont">
                            <div class="product_num">
                                <div class="product_num_input">
                                    <input type="text" id="command_quantity" value="1" maxlength="2" onblur="check_cmd_quantity()"/>
                                </div>
                                <div class="product_num_botton">
                                    <div class="product_num_jia" onclick="update_quantity('add')">
                                    </div>
                                    <div class="product_num_jian" onclick="update_quantity()">
                                    </div>
                                </div>
                            </div>
                            <div class="product_num" style="margin-top:15px; display:inline">
                                <div class="product_shop_btn" onclick="javascript:addToCart(<?php echo $this->_var['goods']['goods_id']; ?>)"> </div>
                            </div>
                        </div>
                    </div>
                    <!--           显示用户评论的数量和平均分数
                     <div class="product_txt_guige">
                        <div class="product_txt_guige_name">
                            <?php echo $this->_var['lang']['goods_average_rank']; ?>
                        </div>
                        <div class="product_txt_guige_cont">
                            <div class="product_num">
                                <div class="product_appraise">
                                </div>
                                <div class="product_appraise_txt">
                                    <div class="product_appraise_txtimg">
                                    </div>
                                    <div class="product_appraise_txtcont">
                                        评论分数： <?php echo $this->_var['goods']['general_goods_rank']; ?>:
                                        <?php echo $this->_var['lang']['goods_rank_total']; ?><?php echo $this->_var['goods']['general_comment_count']; ?>
                                        <?php echo $this->_var['lang']['goods_rank_count']; ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>   
                    -->
                    
                    
                    <div class="product_txt_guige">
                        <div class="product_txt_guige_name">
                            <?php echo $this->_var['lang']['goods_remarks']; ?>
                        </div>
                        <div class="product_txt_guige_cont">
                            <div class="product_prompt">
                                <?php echo $this->_var['goods']['goods_brief']; ?>
                                <?php echo $this->_var['goods']['goods_rank']; ?>
                            </div>
                        </div>
                    </div>    
                        
                        
                    </div>
                    
                    
                    
                </div>
            
</form>                    

            
			
            <?php $this->assign('showdiv_pack','none'); ?>
            <?php $this->assign('pack_count','0'); ?>            
            <?php $_from = $this->_var['fittings']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods_0_88711800_1378288568');if (count($_from)):
    foreach ($_from AS $this->_var['goods_0_88711800_1378288568']):
?>
            	<?php $this->assign('pack_count','N'); ?>
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			<?php if ($this->_var['pack_count'] != '0'): ?>  <?php $this->assign('showdiv_pack','block'); ?> <?php endif; ?>
            <div class="product_package" style="display:<?php echo $this->_var['showdiv_pack']; ?>">
                <div class="product_package_main">
                    
                    <div class="product_package_mains">
                        <div class="product_package_img">
                            <img src="<?php echo $this->_var['goods']['goods_img']; ?>" alt="<?php echo htmlspecialchars($this->_var['goods']['goods_name']); ?>" />
                        </div>
                        <div class="product_package_txt">
                            <a href="<?php echo $this->_var['goods']['url']; ?>" target="_blank" title="<?php echo htmlspecialchars($this->_var['goods']['goods_name']); ?>">
                                <?php echo htmlspecialchars($this->_var['goods']['goods_name']); ?>
                            </a>
                        </div>
                        <div class="product_package_txt">
                            <span>
                                <?php echo $this->_var['goods']['shop_price_formated']; ?>
                            </span>
                        </div>
                    </div>
                    
                    <?php $this->assign('combination_price',$this->_var['goods']['shop_price']); ?>
                    
                    <?php $_from = $this->_var['fittings']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods_0_88745400_1378288568');if (count($_from)):
    foreach ($_from AS $this->_var['goods_0_88745400_1378288568']):
?>
                    <div class="product_package_jia">
                        <div class="product_package_jia_img">
                            <img src="themes/default/images/product_jia.gif" />
                        </div>
                    </div>
                    <div class="product_package_mains">
                        <div class="product_package_img">
                            <img id=item_img<?php echo $this->_var['goods_0_88745400_1378288568']['goods_id']; ?> src="<?php echo $this->_var['goods_0_88745400_1378288568']['goods_thumb']; ?>" alt="<?php echo htmlspecialchars($this->_var['goods_0_88745400_1378288568']['name']); ?>"
                            />
                        </div>
                        <div class="product_package_txt">
                            <a href="<?php echo $this->_var['goods_0_88745400_1378288568']['url']; ?>" target="_blank" title="<?php echo htmlspecialchars($this->_var['goods_0_88745400_1378288568']['goods_name']); ?>">
                                <?php echo htmlspecialchars($this->_var['goods_0_88745400_1378288568']['short_name']); ?>
                            </a>
                        </div>
                        <div class="product_package_txt">
                            
                            <input type="checkbox" name=package_boxes id="price_<?php echo $this->_var['goods_0_88745400_1378288568']['goods_id']; ?>"
                            onclick="update_package_price()" />
                            
                            <span id="shop_price_<?php echo $this->_var['goods_0_88745400_1378288568']['goods_id']; ?>">
                                <?php echo $this->_var['goods_0_88745400_1378288568']['shop_price']; ?>
                            </span>
                            
                            <span id="package_price_<?php echo $this->_var['goods_0_88745400_1378288568']['goods_id']; ?>" style="display:none">
                                <?php echo $this->_var['goods_0_88745400_1378288568']['fittings_price']; ?>
                            </span>
                            <br>
                        </div>
                    </div>
                    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                    
                    
                    <div class="product_package_jia">
                        <div class="product_package_jia_img">
                            <img src="themes/default/images/product_deng.gif" />
                        </div>
                    </div>
                    <div class="product_package_tongji">
                        <div class="product_package_tongji_txt">
                            <div class="product_tongji_one">
                                <?php echo $this->_var['lang']['goods_combination']; ?>
                                <span id="package_promotion_price">
                                    <?php echo $this->_var['goods']['shop_price_formated']; ?>
                                </span>
                            </div>
                            <!--这里需要一个js代码给 combination_Total_price 和 combination_Promoted_price 动态赋值，然后才能够显示在需要的位置
                            -->
                            <div class="product_tongji_two" style="text-decoration:line-through">
                                <?php echo $this->_var['lang']['goods_combination_original_price']; ?>
                                <span id="package_shop_total_price">
                                    <?php echo $this->_var['goods']['shop_price_formated']; ?>
                                </span>
                            </div>
                            
                            <div class="product_tongji_two">
                                <?php echo $this->_var['lang']['goods_combination_saving']; ?>￥
                                <span id="package_saving">
                                    <?php echo $this->_var['combination_Total_price - $combination_Promoted_price']; ?>
                                </span>
                                <span>
                                    <?php echo $this->_var['combination_Total_price - $combination_Promoted_price']; ?>
                                </span>
                            </div>
                        </div>
                        <div class="product_package_tongji_btn">
                            <a href="javascript:addPackToCart(<?php echo $this->_var['goods']['goods_id']; ?>)">
                                <img src="themes/default/images/pay_btn.png" />
                            </a>
                            <span id="package_goods_list_for_cart">
                                <input id='pack_goods_id_list' type="hidden" />
                            </span>
                        </div>
                    </div>
                </div>
            </div>
            
            
            
            <?php if ($this->_var['related_goods'] || true): ?>
            <div class="product_details">
                <div class="product_details_left">
                    <div class="product_dedails_left_name">
                        <?php echo $this->_var['lang']['releate_goods']; ?>
                    </div>
                    <?php $_from = $this->_var['related_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'releated_goods_data');if (count($_from)):
    foreach ($_from AS $this->_var['releated_goods_data']):
?>
                    <div class="product_dedails_left_div">
                        <div class="product_dedails_left_img">
                            <a href="<?php echo $this->_var['releated_goods_data']['url']; ?>">
                                <img src="<?php echo $this->_var['releated_goods_data']['goods_thumb']; ?>" alt="<?php echo $this->_var['releated_goods_data']['goods_name']; ?>"
                                class="B_blue" />
                            </a>
                        </div>
                        <div class="product_dedails_left_txt">
                            <a href="<?php echo $this->_var['releated_goods_data']['url']; ?>" title="<?php echo $this->_var['releated_goods_data']['goods_name']; ?>">
                                <?php echo $this->_var['releated_goods_data']['short_name']; ?>
                            </a>
                        </div>
                        <?php if ($this->_var['releated_goods_data']['promote_price'] != 0): ?>
                        <div class="product_dedails_left_txt" style="color:#3f8c00; font-size:16px;">
                            <?php echo $this->_var['lang']['promote_price']; ?> <?php echo $this->_var['releated_goods_data']['formated_promote_price']; ?>
                            <?php else: ?>
                            <div class="product_dedails_left_txt" style="color:#3f8c00; font-size:16px;">
                                <?php echo $this->_var['lang']['shop_price']; ?> <?php echo $this->_var['releated_goods_data']['shop_price']; ?>
                            </div>
                            <?php endif; ?>
                        </div>
                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                        <?php endif; ?>
                        
                    </div>
                 
                 					<?php $this->assign('show_poison_ctrl','none'); ?>
                                    <?php $_from = $this->_var['properties']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'property_group');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['property_group']):
?>
                                    <?php $_from = $this->_var['property_group']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'property');if (count($_from)):
    foreach ($_from AS $this->_var['property']):
?>
                                      <?php if ($this->_var['property']['name'] == '农残检测'): ?>
                                      		<?php $this->assign('show_poison_ctrl','block'); ?>
                                      <?php endif; ?>
                                    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                                    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>                 
                 
                 
                    
                    <div class="product_details_right">
                        <div class="product_details_right_btn">
                            <div id="product_tab_caption1" class="product_details_btn_yes" name="product_deta" onclick="tab_show_product_detail()">
                                <?php echo $this->_var['lang']['goods_brief']; ?>
                            </div>
                            <div id="product_tab_caption2" class="product_details_btn_no" name="product_deta" style="display:<?php echo $this->_var['show_poison_ctrl']; ?>" onclick="tab_show_product_pControl()">
                                <?php echo $this->_var['lang']['properties']; ?>
                            </div>
                        </div>
                        <div class="product_details_one_img" id="product_detail_tab">
                            <?php echo $this->_var['goods']['goods_desc']; ?>				
                        </div>
                    </div>
                </div>
            </div>
        </div>

        
        			
                    <blockquote class="clearfix" style="display:none">
                                <div class="product_details_two clearfix" id="product_pControl">
                                    <?php $_from = $this->_var['properties']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'property_group');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['property_group']):
?>
                                    <?php $_from = $this->_var['property_group']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'property');if (count($_from)):
    foreach ($_from AS $this->_var['property']):
?>
                                      <?php if ($this->_var['property']['name'] == '农残检测'): ?>
                                        <?php echo $this->_var['property']['value']; ?>
                                      <?php endif; ?>
                                    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                                    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                                </div> 
					</blockquote>                                
        
					
					<blockquote class="clearfix" style="display:none">
                                <div class="product_details_one" id="product_desc" name="product_detas">
                                	<?php echo $this->_var['goods']['goods_desc']; ?>
                                    <!--
                                    
                                    -->
                                </div>
					</blockquote>
                    

            </div>
        <div>
                    </div>
        </div>
		<?php echo $this->fetch('library/page_footer.lbi'); ?>
        </div>
        
    </body>

</html>


